<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('内部案例库详情')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-internal-edit" th:object="${internalCase}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">日期：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(internalCase.date, 'yyyy-MM-dd')}">
                    </div>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">作者：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.author}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">零件名称：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_part', internalCase.partName)}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">零件所属类别：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.partCategoryId}">
                    </div>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">故障模式：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_failure_mode', internalCase.failureModeId)}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">故障原因：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.failureReason}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label is-required">故障所属类别：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_failure_category', internalCase.failureCategoryId)}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">失效信息：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.failureInfo}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">材料牌号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.materialBrand}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">材料所属类别：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_material', internalCase.materialCategoryId)}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">航空型号：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${@dict.getLabel('sys_aviation_model', internalCase.aviationModel)}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">委托方：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.client}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">分析时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(internalCase.analysisTime, 'yyyy-MM-dd')}">
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">归档时间：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${#dates.format(internalCase.archiveTime, 'yyyy-MM-dd')}">
                    </div>

                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">信息来源：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.informationSource}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">基本情况：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.basicSituation}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">案例全文：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.caseFullText}">
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">备注：</label>
                <div class="col-sm-8">
                    <div class="form-control-static" th:text="${internalCase.remarks}">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "internal/internal";
        $("#form-internal-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-internal-edit').serialize());
            }
        }

        $("input[name='date']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='analysisTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });

        $("input[name='archiveTime']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>